package yf.mall.dao;

import com.yf.dao.BaseDao;
import org.apache.ibatis.annotations.Param;
import yf.mall.entity.LevelEntity;
import org.apache.ibatis.annotations.Mapper;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;

/**
 * 级别Dao
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Thu Jul 11 12:00:51 CST 2019
 */
@Mapper
public interface LevelDao extends BaseDao<LevelEntity> {
    //找出最低的级别
    LevelEntity findBase(String auth);

    LevelEntity findByNameAndAuth(@Param("name") String name, @Param("auth") String auth);

    //找出最低级别中的最高级别
    LevelEntity findBaseMax();

    //找出最低的Vip级别
    LevelEntity findVipBase();

//    LevelEntity findByUserId(Long userId);

    List<LevelEntity> findLevelList();

    LevelEntity findTopLv(Integer lv);

    List<LevelEntity> findNextLv(@Param("lv") Integer lv, @Param("auth") String auth);
}
